home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / TPWENG / PUTBLANK.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-22  |  735b  |  32 lines

  1. program PutBlank;
  2. uses PXEngine, WinCrt;
  3.  
  4. const TableName = 'Table';
  5.  
  6. var   PxErr: Integer;
  7.       TblHandle: TableHandle;
  8.       RecHandle: RecordHandle;
  9.       FldHandle: FieldHandle;
  10.  
  11. procedure PX(Code : integer);
  12. begin
  13.   writeln(PXErrMsg(Code));
  14. end;
  15.  
  16. begin
  17.   PX(PXWinInit('MyApp', pxShared));
  18.   PX(PXTblOpen(TableName, TblHandle, 0, False));
  19.   PX(PXRecBufOpen(TblHandle, RecHandle));
  20.   PX(PXFldHandle(TblHandle, 'Alpha Field', FldHandle));
  21.  
  22.   (* Put blanks into record *)
  23.   PxErr := PXPutBlank(RecHandle, FldHandle);
  24.   if PxErr <> PxSuccess then
  25.     Writeln(PxErrMsg(PxErr))
  26.   else PX(PXRecUpdate(TblHandle,RecHandle));
  27.  
  28.   PX(PXRecBufClose(RecHandle));
  29.   PX(PXTblClose(TblHandle));
  30.   PX(PXExit);
  31. end.
  32.